package com.catering.controller;

import com.catering.service.CateringGroupBuyingService;
import com.catering.until.Log;
import com.catering.until.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


@RestController
@RequestMapping("/cateringGroupBuying")
public class CateringGroupBuyingController {

	@Autowired
	private CateringGroupBuyingService cateringGroupBuyingSevice;
	
	@RequestMapping("/select")
	public ResultData select(@RequestBody Map<String,String> map) {
		return cateringGroupBuyingSevice.select(map);
	}
	
	@Log(operation = "新增" , remark="【拼团信息】新增拼团信息" , type = "3")
	@RequestMapping("/insert")
	public ResultData insert(@RequestBody Map<String,String> map) {
		return cateringGroupBuyingSevice.insert(map);
	}
	
	@Log(operation = "修改" , remark="【拼团信息】修改拼团信息" , type = "3")
	@RequestMapping("/update")
	public ResultData update(@RequestBody Map<String,String> map) {
		return cateringGroupBuyingSevice.update(map);
	}
	
	@Log(operation = "删除" , remark="【拼团信息】删除拼团信息" , type = "3")
	@RequestMapping("/delete")
	public ResultData delete(@RequestBody Map<String,String> map) {
		return cateringGroupBuyingSevice.delete(map);
	}
	
}
